package com.coldchain.admin.user.entity;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import org.omg.CORBA.IDLType;

import java.io.Serializable;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @author fangliai
 * @since 2018-08-30
 */
@TableName("ch_admin")
public class Admin implements Serializable {
    public Admin(){}
    public Admin(String loginName, String loginPwd) {
        this.loginName = loginName;
        this.loginPwd = loginPwd;
    }
    @TableId(value = "userId",type = IdType.UUID)
	private String userId;
    /**
     * 登录名
     */
	@TableField("loginName")
	private String loginName;
    /**
     * 登录密码
     */
	@TableField("loginPwd")
	private String loginPwd;
    /**
     * 昵称
     */
	private String nickn;
    /**
     * 手机号码
     */
	private String phone;
    /**
     * 电了信箱
     */
	private String email;
    /**
     * 性别 1男 0女
     */
	private String sex;
    /**
     * 头像
     */
	private String profile;
    /**
     * 角色集
     */
    private String roles;

	private Date createTime;
	private String createBy;
	@JSONField(serialize = false)
	private Date modTime;
	@JSONField(serialize = false)
	private String modBy;
    /**
     * 是否已删除
     */
    @TableLogic
	@JSONField(serialize = false)
	private Integer deleteFlag;
    /**
     * 是否已启用
     */
	private Integer enabled;
    /**
     * 版本号
     */
    @Version
	@JSONField(serialize = false)
	private Integer version;


	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginPwd() {
		return loginPwd;
	}

	public void setLoginPwd(String loginPwd) {
		this.loginPwd = loginPwd;
	}

	public String getNickn() {
		return nickn;
	}

	public void setNickn(String nickn) {
		this.nickn = nickn;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getProfile() {
		return profile;
	}

	public void setProfile(String profile) {
		this.profile = profile;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getModTime() {
		return modTime;
	}

	public void setModTime(Date modTime) {
		this.modTime = modTime;
	}

	public String getModBy() {
		return modBy;
	}

	public void setModBy(String modBy) {
		this.modBy = modBy;
	}

	public Integer getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public Integer getEnabled() {
		return enabled;
	}

	public void setEnabled(Integer enabled) {
		this.enabled = enabled;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

    public String getRoles() {
        return roles;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }
}
